import java.util.Scanner;

public class Main {
    public static void main(String[] args){
        Scanner s=new Scanner(System.in);
        int n=s.nextInt();
        int[] arr=new int[n];
        for (int i = 0; i < n; i++) {
            arr[i]=s.nextInt();
        }
        int count=1;
        int num=arr[0];
        int max=1;
        for (int i = 1; i < n; i++) {
            if(num==arr[i]){
                count++;
                max=max>count?max:count;
            }
            else{
                num=arr[i];
                count=1;
            }
        }
        System.out.print(max);


    }
}